home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
icon_utl
/
iconmorf
/
icondir.frm
next >
Wrap
Text File
|
1995-11-17
|
5KB
|
201 lines
VERSION 2.00
Begin Form frmDirectory
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "Copy To"
ClientHeight = 3885
ClientLeft = 6045
ClientTop = 4875
ClientWidth = 3405
ClipControls = 0 'False
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Courier"
FontSize = 9.75
FontStrikethru = 0 'False
FontTransparent = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 4290
Icon = 0
KeyPreview = -1 'True
Left = 5985
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 259
ScaleMode = 3 'Pixel
ScaleWidth = 227
Tag = "IconWrks Viewer"
Top = 4530
Width = 3525
Begin CommandButton cmdCopy
Caption = "&Copy"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 90
TabIndex = 0
Top = 3360
Width = 1125
End
Begin CommandButton cmdCancel
Caption = "Cancel"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 2190
TabIndex = 5
Top = 3360
Width = 1125
End
Begin Frame fraPath
BackColor = &H00C0C0C0&
Height = 3255
Left = 60
TabIndex = 6
Top = 30
Width = 3285
Begin DirListBox dirList
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 2055
Left = 120
TabIndex = 1
Top = 510
Width = 3075
End
Begin DriveListBox drvList
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 120
TabIndex = 2
Top = 2820
Width = 3075
End
Begin Label zlblDirs
BackStyle = 0 'Transparent
Caption = "&Directories:"
Height = 210
Left = 120
TabIndex = 3
Top = 240
Width = 1365
End
Begin Label zlblDrives
BackStyle = 0 'Transparent
Caption = "Dri&ves:"
Height = 210
Left = 120
TabIndex = 4
Top = 2580
Width = 1365
End
End
End
Option Explicit
Sub cmdCancel_Click ()
' store selected directory in tag property
frmMorph.Tag = gsEMPTY
' unload form
Unload Me
End Sub
Sub cmdCopy_Click ()
' store selected directory in tag property
frmMorph.Tag = dirList.Path
' unload form
Unload Me
End Sub
Sub dirList_Change ()
' change to selected directory
ChDir dirList.Path
End Sub
Sub dirList_KeyPress (KeyAscii As Integer)
' change path with enter
If KeyAscii = 13 Then
dirList.Path = dirList.List(dirList.ListIndex)
End If
End Sub
Sub drvList_Change ()
' Description:
' Check if drive is ready
' Variables
Dim s1 As String
' handle errors
On Error Resume Next
Err = False
' make error happen
s1 = Dir$(Left$(drvList.Drive, 2))
' if drive was not ready
If Err Then
MsgBox Error, MB_ICONSTOP
drvList.Drive = Left$(dirList.Path, 2)
' if OK
Else
ChDrive drvList.Drive
dirList.Path = CurDir$
End If
End Sub
Sub Form_KeyPress (KeyAscii As Integer)
' cancel
If KeyAscii = 27 Then cmdCancel = True
End Sub
Sub Form_Load ()
' set position
If frmMorph.WindowState = NORMAL Then
Top = frmMorph.Top
Left = frmMorph.Left + frmMorph.Width
If Left + Width > Screen.Width Then
Left = frmMorph.Left - Width
End If
Else
zzFormCenter Me
End If
End Sub